/*
 *
 */
package org.jiscinvolve.astrodabis.barberry.common.data;

import org.jiscinvolve.astrodabis.barberry.common.core.Job;
import org.jiscinvolve.astrodabis.barberry.common.core.Tag;
import org.jiscinvolve.astrodabis.barberry.common.core.Owned;
import org.jiscinvolve.astrodabis.barberry.common.core.Tracked;
import org.jiscinvolve.astrodabis.barberry.common.core.Identified;
import org.jiscinvolve.astrodabis.barberry.common.core.Identifier;

/**
 *
 */
public interface TapRow
extends Identified
    {

    public interface Factory
        {

        public Identifier ident(String ident);

        public TapRow create(TapColumn parent, String value);
        public TapRow createQuick(TapColumn parent, String value);

        public TapRow select(Identifier ident);

        public Iterable<TapRow> select();

        public Iterable<TapRow> select(TapColumn parent);

        public TapRow select(TapColumn parent, String value);

//      public Iterable<TapRow> select(Job);

        }

    public TapColumn parent();

    public String value();

    public interface RowTags
        {

        public RowTag create(Job job, Tag tag);
        public RowTag createQuick(Job job, Tag tag);

        public RowTag create(Job job, Tag tag, Double value);
        public RowTag createQuick(Job job, Tag tag, Double value);

        public Iterable<RowTag> select();

        public Iterable<RowTag> select(Tag tag);

        public RowTag select(Identifier ident);

        }

    public RowTags tags();

    public interface TapJoins
        {

        public TapJoin create(TapRow row);
        public TapJoin createQuick(TapRow row);

        public TapJoin select(TapRow row);

        public Iterable<TapJoin> select(TapJoin.SelectType type);

        public Iterable<TapJoin> select(TapRow row, TapJoin.SelectType type);

        public TapJoin select(Identifier ident);

        }

    public TapJoins joins();

    }


